﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpModelInterface.h"
#include "IEventArgs.h"
#include "ElementId.h"


namespace gcmp
{
    class IDocument;

    /// \brief 多段线事件类型
    enum class DrawingPolyCurveEventType : int32_t
    {
        PostAddCurve = 0,        ///< 多段线增加曲线
        PostDeleteCurve = 1,     ///< 多段线删除曲线
        PostReplaceCurve = 2,    ///< 多段线替换曲线
    };

    /// \brief  多段线事件参数
    class GCMP_MODEL_INTERFACE_EXPORT IDrawingPolyCurveEventArgs : public IEventArgs
    {
        DEFINE_CAST_DERIVED(gcmp::IDrawingPolyCurveEventArgs, gcmp::IEventArgs)
    public:

        ///  \brief 获取多段线事件类型
        ///
        /// \return 多段线事件类型
        virtual DrawingPolyCurveEventType GetType() const = 0;

        ///  \brief 获取多段线事件对应的文档
        ///
        /// \return 多段线事件文档指针
        virtual IDocument* GetDocument() const = 0;

        ///  \brief 获取多段线事件对应的视图Id
        ///
        /// \return 视图Id
        virtual ElementId GetModelViewId() const = 0;

        /// \brief 获取多段线事件对应的ElementId
        ///
        /// \return 多段线ElementId
        virtual ElementId GetDrawingPolyCurveElementId() const = 0;
    };
}